package com.hdoit.ares.logical.ser.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.hdoit.ares.logical.ser.dao.IGoodsServiceDao;
import com.hdoit.ares.logical.ser.model.GoodsService;
import com.hdoit.ares.logical.ser.service.IGoodStoreService;
import com.hdoit.ares.logical.ser.service.IGoodsServiceService;
import com.hdoit.ares.logical.viewmodel.ser.GoodsServiceSearch;
import com.tennetcn.common.dao.base.impl.SuperService;
import com.tennetcn.common.logical.setting.model.ParamOption;
import com.tennetcn.common.logical.setting.service.IParamOptionService;
import com.tennetcn.common.logical.viewmodel.setting.ParamOptionSearch;
import com.tennetcn.common.message.PagerModel;
/**
 * @author      lvsi
 * @email       
 * @createtime  2017年11月22日 14:24:18
 * @comment
 */
@Component
public class GoodsServiceServiceImpl extends SuperService<GoodsService> implements IGoodsServiceService{

	private IGoodStoreService goodStoreService;

	public IGoodStoreService getGoodStoreService() {
		return goodStoreService;
	}

	@Resource
	public void setGoodStoreService(IGoodStoreService goodStoreService) {
		this.goodStoreService = goodStoreService;
	}

	private IGoodsServiceDao goodsServiceDao;
	
	public IGoodsServiceDao getGoodsServiceDao() {
		return goodsServiceDao;
	}

	@Resource
	public void setGoodsServiceDao(IGoodsServiceDao goodsServiceDao) {
		this.goodsServiceDao = goodsServiceDao;
	}
	
	private IParamOptionService paramOptionService;

	public IParamOptionService getParamOptionService() {
		return paramOptionService;
	}
	
	@Resource
	public void setParamOptionService(IParamOptionService paramOptionService) {
		this.paramOptionService = paramOptionService;
	}


	@Override
	public int queryStoreGoodsCountById(GoodsServiceSearch goodsServiceSearch,
			String loginId) {
		
		return goodsServiceDao.queryStoreGoodsCountById(goodsServiceSearch, loginId);
	}

	@Override
	public List<GoodsService> queryStoreGoodsById(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel,
			String loginId) {

		return goodsServiceDao.queryStoreGoodsById(goodsServiceSearch, pagerModel, loginId);
	}

	@Override
	public int queryGoodsServiceCount(GoodsServiceSearch goodsServiceSearch) {
		
		return goodsServiceDao.queryGoodsServiceCount(goodsServiceSearch);
	}

	@Override
	public List<GoodsService> queryGoodsServiceList(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel) {
		
		return goodsServiceDao.queryGoodsServiceList(goodsServiceSearch, pagerModel);
	}

	@Override
	public GoodsService queryGoodsServiceModel(String key) {
		
		return goodsServiceDao.queryGoodsServiceModel(key);
	}

	@Override
	public List<ParamOption> queryAllServiceTypeName(String ServiceTypeName) {
		
		return paramOptionService.queryListByParamName(ServiceTypeName);
	}

	@Override
	public List<ParamOption> queryList(String parentId) {
		ParamOptionSearch search = new ParamOptionSearch();
		search.setParentId(parentId);
		return paramOptionService.queryList(search);
	}

	@Override
	public List<GoodsService> queryFirstGoods(String serviceTypeName,
			String serviceName,String deleteMark) {
		
		return goodsServiceDao.queryFirstGoods(serviceTypeName, serviceName,deleteMark);
	}

	public Integer queryMaxGoodsSortCode() {
		
		return goodsServiceDao.queryMaxGoodsSortCode();
	}

	@Override
	public int queryGoodsServiceCountById(
			GoodsServiceSearch goodsServiceSearch, String loginId) {
		
		return goodsServiceDao.queryGoodsServiceCountById(goodsServiceSearch, loginId);
	}

	@Override
	public List<GoodsService> queryGoodsServiceListById(
			GoodsServiceSearch goodsServiceSearch, PagerModel pagerModel,
			String loginId) {

		return goodsServiceDao.queryGoodsServiceListById(goodsServiceSearch, pagerModel, loginId);
	}

	@Override
	public GoodsService selectModelById(String id) {
			
		return goodsServiceDao.queryModelById(id);
	}

	@Override
	public int updateLargePicById(String id) {
		
		return goodsServiceDao.updateLargePicById(id);
	}

	@Override
	public int updateSmallPicById(String id) {
		
		return goodsServiceDao.updateSmallPicById(id);
	}


}

